<template>
	<view>
		<Header title="锁卡" :showBack="true"></Header>
		<view class="card">
			IC卡号：{{cardNum}}
		</view>
		<view class="button">
			<button @click="summit" type="default">锁卡</button>
			<view>锁卡之后吗，此卡将不能使用，请谨慎操作</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				cardNum:uni.getStorageSync('cardNo'),
			}
		},
		methods: {
			summit(){
				this.$http('/minprogram/api/member/lock?cardNo='+this.cardNum,{},res=>{
					if(res.data.value==true){
						uni.showToast({
							icon:'none',
							title:'操作成功'
						})
						setTimeout(()=>{
							uni.reLaunch({
								url:'/pages/index/index?type=1'
							})
						},1200)
					}
				})
			}
		}
	}
</script>

<style scoped lang="less">
.card{
	width: 95%;
	margin: 30upx auto 0;
	background-color: #FFFFFF;
	border-radius: 12upx;
	height: 150upx;
	line-height: 150upx;
	font-size: 40upx;
	text-indent: 80upx;
}
.button{
	width: 95%;
	background-color: #FFFFFF;
	margin: 30upx auto 0;
	padding-top: 40upx;
	border-radius: 12upx;
	font-size: 28upx;
	button{
		width: 95%;
		height: 80upx;
		background-color: #2BAC6B;
		border: none;
		color: #FFFFFF;
		font-size: 28upx;
		line-height: 80upx;
	}
	view{
		width: 100%;
		text-align: center;
		height: 130upx;
		line-height: 130upx;
	}
}
</style>
